<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      console.log(Boolean(0)); // 数字0
      console.log(Boolean("0")); // 字符串 0 true
      console.log(Boolean(null));
      console.log(Boolean(NaN));
      console.log(Boolean("")); // 空字符
      console.log(Boolean("  ")); // 空格字符 true
      console.log(Boolean(undefined));
    </script>
  </body>
</html>
